import os

if __name__ == '__main__':
    dataset_dir = '/run/media/hdd/Recommendation/'
    rating_dir = '/home/bianzheng/CLionProjects/rec2-mips/intermediate-rating-csv'

    # amazon_input_dir = os.path.join(dataset_dir, 'amazon', 'all_csv_files.csv')
    # amazon_output_dir = os.path.join(rating_dir, 'amazon.csv')
    # os.system('cd build && ./amazon {} {}'.format(amazon_input_dir, amazon_output_dir))

    amazon_kitchen_input_dir = os.path.join(dataset_dir, 'amazon_home_kitchen', 'ratings_Home_and_Kitchen.csv')
    amazon_kitchen_output_dir = os.path.join(rating_dir, 'amazon-home-kitchen.csv')
    os.system('cd build && ./amazon_home_kitchen {} {}'.format(amazon_kitchen_input_dir, amazon_kitchen_output_dir))

    # bookcross_input_dir = os.path.join(dataset_dir, 'Book-crossing', 'BX-Book-Ratings.csv')
    # bookcross_output_dir = os.path.join(rating_dir, 'book-crossing.csv')
    # os.system('cd build && ./bookcrossing {} {}'.format(bookcross_input_dir, bookcross_output_dir))
    #
    # goodreads_input_dir = os.path.join(dataset_dir, 'Goodreads', 'goodreads_interactions.csv')
    # goodreads_output_dir = os.path.join(rating_dir, 'goodreads.csv')
    # os.system('cd build && ./goodreads {} {}'.format(goodreads_input_dir, goodreads_output_dir))
    #
    # movielens27m_input_dir = os.path.join(dataset_dir, 'movielens-27m', 'ratings.csv')
    # movielens27m_output_dir = os.path.join(rating_dir, 'movielens-27m.csv')
    # os.system('cd build && ./movielens27m {} {}'.format(movielens27m_input_dir, movielens27m_output_dir))
    #
    # netflix_input_dir = os.path.join(dataset_dir, 'netflix')
    # netflix_output_dir = os.path.join(rating_dir, 'netflix.csv')
    # os.system('cd build && ./netflix {} {}'.format(netflix_input_dir, netflix_output_dir))

    # steam_input_dir = os.path.join(dataset_dir, 'steam', 'steam_reviews.json')
    # steam_intermediate_dir = os.path.join(dataset_dir, 'steam', 'steam_reviews_ratings.csv')
    # steam_output_dir = os.path.join(rating_dir, 'steam.csv')
    # convert_steam.convert_ratings(steam_input_dir, steam_intermediate_dir)
    # os.system('cd build && ./steam {} {}'.format(steam_intermediate_dir, steam_output_dir))
    #
    # yahoomusic_input_dir = os.path.join(dataset_dir, 'yahoomusic', 'ydata-ymusic-user-artist-ratings-v1_0.txt')
    # yahoomusic_output_dir = os.path.join(rating_dir, 'yahoomusic.csv')
    # os.system('cd build && ./yahoomusic {} {}'.format(yahoomusic_input_dir, yahoomusic_output_dir))
    #
    # yahoomusicbig_input_dir = os.path.join(dataset_dir, 'yahoomusic_big')
    # yahoomusicbig_output_dir = os.path.join(rating_dir, 'yahoomusic_big.csv')
    # os.system('cd build && ./yahoomusicbig {} {}'.format(yahoomusicbig_input_dir, yahoomusicbig_output_dir))

    # yelp_input_dir = os.path.join(dataset_dir, 'yelp', 'yelp_academic_dataset_review.json')
    # yelp_intermediate_dir = os.path.join(dataset_dir, 'yelp', 'yelp_ratings.csv')
    # yelp_output_dir = os.path.join(rating_dir, 'yelp.csv')
    # convert_yelp.convert_ratings(yelp_input_dir, yelp_intermediate_dir)
    # os.system('cd build && ./yelp {} {}'.format(yelp_intermediate_dir, yelp_output_dir))
